<template>
	<view>
		<cu-custom :isBack="true" bgColor="bg-white solids-bottom">
			<block slot="content">
				{{detail.Cantavil}}
			</block>
			<block slot="right">
				<text class="cuIcon-like" style="font-size: 40upx;line-height: 60upx;" ></text>
			</block>
		</cu-custom>
		<view class="article-meta boxs">
			<text class="article-author f18 mb10">{{detail.Cantavil}}</text>
			<view class="house-lable clearfix mb10" v-for="(item,index) in detail.Tags" :key="index">
				<view class="house-lable-box">{{item}}</view>
			</view>
			<view class="house-detail clearfix">
				<!-- <view class="w100">
					<label class="lable">销售状态</label>
					<text class="text">在售</text>
				</view> -->
				<view class="w100">
					<label class="lable">开盘时间</label>
					<text class="text">{{detail.OpenTime?detail.OpenTime:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable" v-if="detail.PriceTypeDisplay.length==2">
						<span style="letter-spacing: 56upx;">{{detail.PriceTypeDisplay[0]}}</span>{{detail.PriceTypeDisplay[1]}}
					</label>
					<label class="lable" v-else-if="detail.PriceTypeDisplay.length==3">
						<span style="letter-spacing: 14upx;">{{detail.PriceTypeDisplay[0]}}{{detail.PriceTypeDisplay[1]}}</span>{{detail.PriceTypeDisplay[2]}}
					</label>
					<label class="lable" v-else>{{detail.PriceTypeDisplay}}</label>
					<text class="text">{{detail.PriceDisplay?detail.PriceDisplay:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable">交楼时间</label>
					<text class="text">{{detail.JiaoLouTime?detail.JiaoLouTime:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable">楼盘地址</label>
					<text class="text">{{detail.Address?detail.Address:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 14upx;">开发</span>商</label>
					<text class="text">{{detail.Developer?detail.Developer:"-"}}</text>
				</view>
			</view>
		</view>
		<view class="warp30"></view>
		<view class="article-meta boxs">
			<text class="article-author f16 mb10">建筑规划</text>
			<view class="house-detail clearfix">
				<view class="w100">
					<label class="lable">占地面积</label>
					<text class="text">{{detail.PlanArea?detail.PlanArea:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable">建筑面积</label>
					<text class="text">{{detail.BuildArea?detail.BuildArea:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 14upx;">容积</span>率</label>
					<text class="text">{{detail.PlotRatio?detail.PlotRatio:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 14upx;">绿化</span>率</label>
					<text class="text">{{detail.ForestRate?detail.ForestRate:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable">建筑类型</label>
					<text class="text">{{detail.Category?detail.Category:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 56upx;">产</span>权</label>
					<text class="text">{{detail.HousePropertyTimeStr?detail.HousePropertyTimeStr:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable">装修状态</label>
					<text class="text">{{detail.HouseFittment?detail.HouseFittment:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 14upx;">总户</span>数</label>
					<text class="text">{{detail.NumberOfNeighborhood?detail.NumberOfNeighborhood:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 14upx;">停车</span>位</label>
					<text class="text">{{detail.ParkingSpace?detail.ParkingSpace:"-"}}</text>
				</view>
			</view>
		</view>
		<view class="warp30"></view>
		<view class="article-meta boxs">
			<text class="article-author f16 mb10">物业信息</text>
			<view class="house-detail clearfix">
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 14upx;">物业</span>费</label>
					<text class="text">{{detail.EstatePrice?detail.EstatePrice:"-"}}</text>
				</view>
				<view class="w100">
					<label class="lable">物业公司</label>
					<text class="text">{{detail.EstateManager?detail.EstateManager:"-"}}</text>
				</view>
			</view>
		</view>
		<view class="warp30"></view>
		<view class="article-meta boxs">
			<text class="article-author f16 mb10">交通路线</text>
			<view class="house-detail clearfix">
				<view class="w100">
					<label class="lable"><span style="letter-spacing: 56upx;">公</span>交</label>
					<text class="text">{{detail.TrafficPath?detail.TrafficPath:"-"}}</text>
				</view>
			</view>
		</view>
		<view class="warp30"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '怡景豪园',
				bannerId:null,
				detail:null
			};
		},
		onLoad:function(event){
			this.bannerId = event.detailId;
			console.info(event,this.bannerId);
			this.getHotList();
		},
		methods: {
			getHotList() {
				let _this = this;
				let data = {id:this.bannerId};
				uni.request({
					url: this.AjaxUrl + '/WebApi/GetX3NewHouseEstateDetailMore',
					data:data,
					success: (res) => {
						if (res.statusCode == 200) {
							_this.detail = JSON.parse(res.data.Extend);
							console.info(_this.detail);
						}
					},
				});
			}
		}
	}
</script>

<style lang="less">
	.article-meta {
		padding: 30upx 30upx;
		color: #333333;
		display: block;
		background: #FFFFFF;
	}
	.house-detail{
		.w100,.w50{
			float: left;
			width: 100%;
			display: flex;
			margin-bottom: 10upx;
			.lable{
				display: inline-block;
				padding-right: 10upx;
				color: #999999;
				box-sizing: content-box;
			}
			.text{
				flex: 1;
				padding-left: 10upx;
			}
		}
		.w50{
			width: 50%;
			&.right{
				.lable{
					width: 112upx
				}
			}
		}
	}
	.house-lable{
		.house-lable-box{
			display: inline-block;
			background:#f2f2f2;
			color:#999999;
			border-radius: 6upx;
			padding: 10upx 16upx;
			line-height: 1;
			float: left;
			margin: 0 10upx 10upx 0;
			font-size: 24upx;
		}
	}
	.article-author{
		font-size: 48upx;
		display: block;
		line-height: 1.5;
		color: #333333;
		&.f18{
			font-size: 36upx;
			font-weight: 500;
		}
		&.f16{
			font-size: 32upx;
			line-height: 2;
			font-weight: 600;
		}
		&.f14{
			font-size: 28upx;
			font-weight: normal;
			span{
				color: #248ae5;
			}
		}
	}
	.mb10{
		margin-bottom: 20upx;
	}
</style>
